﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace Exe_1.Controllers
{
    [HandleError]
    public class HomeController : Controller
    {
        public ActionResult Index(string pageTitle, string language)
        {
            ViewData["Message"] = pageTitle + " " + language.ToUpperInvariant();

            if (!language.Equals("it") && !language.Equals("en"))
            {
                TempData["Language"] = language;
                return RedirectToAction("NotSupported");
            }

            return View("Index");
        }

        public ActionResult About()
        {
            return View();
        }
    }
}
